package cn.my.framework.common.mapper;

import cn.my.framework.common.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * Created by zhangl_lc on 2017/7/10.
 */
@Mapper
public interface UserMapper {

    @Select("select * from User")
    @ResultMap("UserResultMap")
    List<User> selectUsers();

    @Select("select * from User where id = #{id}")
    @ResultMap("UserResultMap")
    User findUser(@Param("id") Integer id);
}
